package com.takeeasy.platform.dataobject;

import java.util.HashMap;
import java.util.Map;

import com.takeeasy.platform.persistence.Page;

public class ResponseDataObject implements IDataObject {

	private static final long serialVersionUID = -3367656711004987968L;

	private String responseJsonString;
	private Page page;
	private Map<String, Object> responseMap;
	private String errorString;
	private String submitType;
	private String forwardPage;
	private String redirectPage;
	private String originalUserJson;

	private String encode = "UTF-8";
	private String contentType = "text/json;charset=utf-8";

	public String getResponseJsonString() {
		return responseJsonString;
	}

	public void setResponseJsonString(String responseJsonString) {
		this.responseJsonString = responseJsonString;
	}

	public Map<String, Object> getResponseMap() {
		return responseMap;
	}

	public void setResponseMap(Map<String, Object> responseMap) {
		this.responseMap = responseMap;
	}

	public Page getPage() {
		return page;
	}

	public void setPage(Page page) {
		this.page = page;
	}

	public void addToResponseMap(String key, Object value) {
		if (this.responseMap == null) {
			this.responseMap = new HashMap<>();
		}
		this.responseMap.put(key, value);
	}

	public String getErrorString() {
		return errorString;
	}

	public void setErrorString(String errorString) {
		this.errorString = errorString;
	}

	public String getSubmitType() {
		return submitType;
	}

	public void setSubmitType(String submitType) {
		this.submitType = submitType;
	}

	public String getForwardPage() {
		return forwardPage;
	}

	public void setForwardPage(String forwardPage) {
		this.forwardPage = forwardPage;
	}

	public String getRedirectPage() {
		return redirectPage;
	}

	public void setRedirectPage(String redirectPage) {
		this.redirectPage = redirectPage;
	}

	public String getOriginalUserJson() {
		return originalUserJson;
	}

	public void setOriginalUserJson(String originalUserJson) {
		this.originalUserJson = originalUserJson;
	}

	public String getEncode() {
		return encode;
	}

	public void setEncode(String encode) {
		this.encode = encode;
	}

	public String getContentType() {
		return contentType;
	}

	public void setContentType(String contentType) {
		this.contentType = contentType;
	}

}
